image: node:latest

stages:
  - deploy

deploy:
  stage: deploy
  script:
    - echo "//<%= gitlab_host_without_port %>/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=<%= auth_token %>">.npmrc
    - npm publish
  only:
    - "<%= project.default_branch %>"
  tags:
    - "runner-for-<%= project.group.name %>"